//package com.pic.others.handler;
//
//import com.pic.others.service.INoteService;
//import com.pic.others.service.IRecyleService;
//import com.xxl.job.core.context.XxlJobHelper;
//import com.xxl.job.core.handler.annotation.XxlJob;
//import io.swagger.models.auth.In;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDate;
//import java.time.LocalDateTime;
//import java.util.ArrayList;
//import java.util.List;
//
//@Slf4j
//@Component
//@RequiredArgsConstructor
//public class AutoDeleteInRecyleHandler {
//
//    private final IRecyleService recyleService;
//
//
//    //自动删除图片
//@XxlJob("inTimeDeleteNote")
//    public void inTimeDeleteNote(){
//        LocalDateTime now=LocalDateTime.now();
////        log.info("任务调度执行中");
//        recyleService.deleteByTime(now);
//    }
//
//
//
//    @XxlJob("shardingJobHandler")
//    public void shardingHandler(){
//        //分片的参数
//        int shardIndex = XxlJobHelper.getShardIndex();
//        int shardTotal = XxlJobHelper.getShardTotal();
//        //业务逻辑
//        List<Integer> list=getList();
//        for (Integer integer: list) {
//            if(integer%shardTotal==shardIndex){
//                System.out.println("当前第:"+shardIndex+"分片执行了，任务项为"+integer);
//            }
//        }
//    }
//
//    public List getList(){
//        List<Integer>list=new ArrayList<>();
//        for(int i=0;i<10000;i++){
//          list.add(i);
//        }
//        return list;
//    }
//}
